﻿<Page
    x:Class="Devmil.MVVM.Sample_W8.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Devmil.MVVM.Sample_W8"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="Devmil.MVVM"  Margin="12,0" Style="{StaticResource PageHeaderTextStyle}"/>
            <TextBlock Text="Samples" Margin="9,-7,0,0" Style="{StaticResource PageSubheaderTextStyle}"/>
        </StackPanel>

        <!--ContentPanel - zusätzliche Inhalte hier platzieren-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Grid.Row="0" Text="Current Contact:" Padding="10" />
            <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding CurrentContactNameString}" Padding="10" />
            <ListBox Margin="10" Grid.ColumnSpan="2" Grid.Row="1" ItemsSource="{Binding Contacts}" SelectedIndex="{Binding SelectedContactIndex, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" FontSize="30" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
</Page>
